using System;
using Sanelib.Dto;

namespace Common.Commands.TemplateCommands
{
	public class AddTemplete: Command
	{
		public string Name { get; set; }
		public string Value { get; set; }

		public override Guid? GetAggregateId()
		{
			return null;
		}

		public override ErrorResult Validate()
		{
			var validationResult = new ErrorResult();

            if (string.IsNullOrWhiteSpace(Name) || string.IsNullOrWhiteSpace(Value))
                validationResult.AddError("Templete Name and Templete Value", "should not be empty.");

			return validationResult;
		}
	}
}
